Integrand size = 26, antiderivative size = 97 \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=a^2 c^3 x-\frac {3 a^2 c^3 \text {arctanh}(\sin (e+f x))}{8 f}-\frac {a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac {a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3989, 3966, 3855} \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=-\frac {3 a^2 c^3 \text {arctanh}(\sin (e+f x))}{8 f}+\frac {a^2 \tan ^3(e+f x) \left (4 c^3-3 c^3 \sec (e+f x)\right )}{12 f}-\frac {a^2 \tan (e+f x) \left (8 c^3-3 c^3 \sec (e+f x)\right )}{8 f}+a^2 c^3 x \]
[In]
[Out]
Rule 3855
Rule 3966
Rule 3989
Rubi steps \begin{align*} \text {integral}& = \left (a^2 c^2\right ) \int (c-c \sec (e+f x)) \tan ^4(e+f x) \, dx \\ & = \frac {a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}-\frac {1}{4} \left (a^2 c^2\right ) \int (4 c-3 c \sec (e+f x)) \tan ^2(e+f x) \, dx \\ & = -\frac {a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac {a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}+\frac {1}{8} \left (a^2 c^2\right ) \int (8 c-3 c \sec (e+f x)) \, dx \\ & = a^2 c^3 x-\frac {a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac {a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f}-\frac {1}{8} \left (3 a^2 c^3\right ) \int \sec (e+f x) \, dx \\ & = a^2 c^3 x-\frac {3 a^2 c^3 \text {arctanh}(\sin (e+f x))}{8 f}-\frac {a^2 \left (8 c^3-3 c^3 \sec (e+f x)\right ) \tan (e+f x)}{8 f}+\frac {a^2 \left (4 c^3-3 c^3 \sec (e+f x)\right ) \tan ^3(e+f x)}{12 f} \\ \end{align*}
Time = 0.73 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.26 \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {a^2 c^3 \sec ^4(e+f x) \left (72 e+72 f x-72 \text {arctanh}(\sin (e+f x)) \cos ^4(e+f x)+96 (e+f x) \cos (2 (e+f x))+24 e \cos (4 (e+f x))+24 f x \cos (4 (e+f x))-18 \sin (e+f x)-32 \sin (2 (e+f x))+30 \sin (3 (e+f x))-32 \sin (4 (e+f x))\right )}{192 f} \]
[In]
[Out]
Time = 3.32 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.37
method | result | size |
parts | \(a^{2} c^{3} x -\frac {a^{2} c^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}-\frac {2 a^{2} c^{3} \tan \left (f x +e \right )}{f}+\frac {a^{2} c^{3} \sec \left (f x +e \right ) \tan \left (f x +e \right )}{f}-\frac {a^{2} c^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}\) | \(133\) |
risch | \(a^{2} c^{3} x -\frac {i a^{2} c^{3} \left (15 \,{\mathrm e}^{7 i \left (f x +e \right )}+48 \,{\mathrm e}^{6 i \left (f x +e \right )}-9 \,{\mathrm e}^{5 i \left (f x +e \right )}+96 \,{\mathrm e}^{4 i \left (f x +e \right )}+9 \,{\mathrm e}^{3 i \left (f x +e \right )}+80 \,{\mathrm e}^{2 i \left (f x +e \right )}-15 \,{\mathrm e}^{i \left (f x +e \right )}+32\right )}{12 f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{4}}+\frac {3 a^{2} c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{8 f}-\frac {3 a^{2} c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{8 f}\) | \(162\) |
derivativedivides | \(\frac {-a^{2} c^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-a^{2} c^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+2 a^{2} c^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-2 a^{2} c^{3} \tan \left (f x +e \right )-a^{2} c^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+a^{2} c^{3} \left (f x +e \right )}{f}\) | \(171\) |
default | \(\frac {-a^{2} c^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-a^{2} c^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+2 a^{2} c^{3} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-2 a^{2} c^{3} \tan \left (f x +e \right )-a^{2} c^{3} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+a^{2} c^{3} \left (f x +e \right )}{f}\) | \(171\) |
parallelrisch | \(\frac {a^{2} c^{3} \left (9 \left (3+\cos \left (4 f x +4 e \right )+4 \cos \left (2 f x +2 e \right )\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+9 \left (-\cos \left (4 f x +4 e \right )-4 \cos \left (2 f x +2 e \right )-3\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+96 f x \cos \left (2 f x +2 e \right )+24 f x \cos \left (4 f x +4 e \right )+72 f x +30 \sin \left (3 f x +3 e \right )-32 \sin \left (4 f x +4 e \right )-18 \sin \left (f x +e \right )-32 \sin \left (2 f x +2 e \right )\right )}{24 f \left (3+\cos \left (4 f x +4 e \right )+4 \cos \left (2 f x +2 e \right )\right )}\) | \(182\) |
norman | \(\frac {a^{2} c^{3} x +a^{2} c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}-\frac {5 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {71 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{12 f}-\frac {137 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{12 f}+\frac {11 a^{2} c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{4 f}-4 a^{2} c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+6 a^{2} c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-4 a^{2} c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{4}}+\frac {3 a^{2} c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{8 f}-\frac {3 a^{2} c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{8 f}\) | \(238\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.52 \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {48 \, a^{2} c^{3} f x \cos \left (f x + e\right )^{4} - 9 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) + 9 \, a^{2} c^{3} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (32 \, a^{2} c^{3} \cos \left (f x + e\right )^{3} - 15 \, a^{2} c^{3} \cos \left (f x + e\right )^{2} - 8 \, a^{2} c^{3} \cos \left (f x + e\right ) + 6 \, a^{2} c^{3}\right )} \sin \left (f x + e\right )}{48 \, f \cos \left (f x + e\right )^{4}} \]
[In]
[Out]
\[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=- a^{2} c^{3} \left (\int \left (-1\right )\, dx + \int \sec {\left (e + f x \right )}\, dx + \int 2 \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (- 2 \sec ^{3}{\left (e + f x \right )}\right )\, dx + \int \left (- \sec ^{4}{\left (e + f x \right )}\right )\, dx + \int \sec ^{5}{\left (e + f x \right )}\, dx\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (91) = 182\).
Time = 0.21 (sec) , antiderivative size = 203, normalized size of antiderivative = 2.09 \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {16 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a^{2} c^{3} + 48 \, {\left (f x + e\right )} a^{2} c^{3} + 3 \, a^{2} c^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 24 \, a^{2} c^{3} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 48 \, a^{2} c^{3} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) - 96 \, a^{2} c^{3} \tan \left (f x + e\right )}{48 \, f} \]
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.58 \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {24 \, {\left (f x + e\right )} a^{2} c^{3} - 9 \, a^{2} c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right ) + 9 \, a^{2} c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right ) + \frac {2 \, {\left (33 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 137 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 71 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 15 \, a^{2} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{4}}}{24 \, f} \]
[In]
[Out]
Time = 15.22 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.68 \[ \int (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^3 \, dx=\frac {\frac {11\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}-\frac {137\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{12}+\frac {71\,a^2\,c^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{12}-\frac {5\,a^2\,c^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+a^2\,c^3\,x-\frac {3\,a^2\,c^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{4\,f} \]
[In]
[Out]